<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>BOA_RateCard_CHI_CHAR_NY</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery.roundabout.js"></script>

<script>

  $("#slideshow > div:gt(0)").hide();

  setInterval(function() { 
    $('#slideshow > div:first')
      .fadeOut()
      .next()
      .fadeIn(1000)
      .delay(4000)
      .fadeOut(500)
      .end()
      .appendTo('#slideshow');
  },  5500);
      
    
  $(document).ready(function() {
    $('ul').roundabout({
        maxScale: 1,
        minScale: 0.4,
        minOpacity: 1,
        autoplay: true,
    }); 
    $('ul').roundabout("changeAutoplayDuration", 5500);
 });
</script>

<!-- Set the card inputs-->
<!-- This snippet fetches the data from the second entries-->
<script>
//Feed
    

$(document).ready(function(){
    
    var data_str = null;
	var url = "https://test2.bridgetree.com/rateboard/ratefeed/?state=NY&callback=?";
    //to get the local machine time
    var newDate = new Date();
    var date = newDate.getDate();
    var month = newDate.getMonth() + 1; // Note: 0 = January, 1 = February etc.
    var year = newDate.getFullYear().toString().substr(2,2);
    if(date < 10) {
        var date_str = '0' + date.toString();
    }
    else {
        var date_str = date.toString();
    }
    //document.getElementsByClassName("TodayDate").innerHTML = month.toString() + '/' + date_str + '/' + year;
    document.getElementById("todayDate").innerHTML = date_str;
    document.getElementById("todayMonth").innerHTML = month.toString();
    document.getElementById("todayYear").innerHTML = year;
    var fullDate = month.toString() + '/' + date_str + '/' + year;



    //to get data from dynamically URL
    $.getJSON(url, function(result){
        data_str = JSON.stringify(result);
		
		//hide Backup image
		$('#imageBackup').hide();
		$("#mainC").show();
		
        $.each(result.MortgageRates, function() {
			
            //to get the 30YR FIXED JUMBO data and exchange the present content of inputs of card 1
            if(this.MortName == "30YR FIXED CONFORMING" && this.MortProductGroup == "10") {
                document.getElementById("30YR_MortApr").innerHTML = this.MortApr;
                document.getElementById("30YR_MortRate").innerHTML = this.MortRate;
                document.getElementById("30YR_MortMonthlyPaymentPer1000").innerHTML = this.MortMonthlyPaymentPer1000;
                if(this.MortPoints < 1) {
                  document.getElementById("30YR_MortPoints").innerHTML = '0' + this.MortPoints;
                }
                else {
                  document.getElementById("30YR_MortPoints").innerHTML = this.MortPoints;
                }
                document.getElementById("30YR_Date").innerHTML = fullDate;
            }
            //to get the 15YR FIXED CONFORMING data and exchange the present content of inputs of card 2
            else if(this.MortName == "15YR FIXED CONFORMING" && this.MortProductGroup == "40") {
                document.getElementById("15YR_MortApr").innerHTML = this.MortApr;
                document.getElementById("15YR_MortRate").innerHTML = this.MortRate;
                document.getElementById("15YR_MortMonthlyPaymentPer1000").innerHTML = this.MortMonthlyPaymentPer1000;
                if(this.MortPoints < 1) {
                    document.getElementById("15YR_MortPoints").innerHTML = '0' + this.MortPoints;
                }
                else {
                    document.getElementById("15YR_MortPoints").innerHTML = this.MortPoints;
                }
                document.getElementById("15YR_Date").innerHTML = fullDate;
            }
        })  //-----MortgageRates------
        

        //to get the HomeEquityRates data and exchange the present content of inputs of card 3
        $.each(result.HomeEquityRates, function() {
          if(this.HeRateMinLoanAmount == "50000"){
            document.getElementById("HE_HeRate").innerHTML = this.HeRate;
            document.getElementById("HE_HeRateMinLoanAmount").innerHTML = "50,000";
            document.getElementById("HE_MonthlyPaymentPer1000").innerHTML = this.MonthlyPaymentPer1000;
            document.getElementById("HE_IndexValue").innerHTML = this.IndexValue;
            document.getElementById("HE_Date").innerHTML = fullDate;
          }
        })//------HomeEquityRates------
    });
});
</script>

</head>

<body>

<div id="imageBackup"><img src="images/Digital_rateboard_default_final.jpg"></div>
<div id="mainC" class="mainContainer" style="display:none">
    <!-- <img class="ref" src="Asset/scene1.jpg"> -->
    <div id="slideshow">
        <div>
          <div class="pageTitleContainer">
            <div class="pageTitle">
                <p>Today&#8217;s Purchase Rates</p>
            </div><!-- .pageTitle -->
          </div><!-- .pageTitleContainer --> 
          
          <div class="headlineContainer">
            <div class="headline">
                <p class="biggerText">Looking to<br>buy a home?</p>
            </div><!-- .headline -->
          </div><!-- .headlineContainer --> 
        </div>
        
        <div>
          <div class="pageTitleContainer">
            <div class="pageTitle">
                <p>Today&#8217;s Refinance Rates</p>
            </div><!--.pageTitle-->
          </div><!--.pageTitleContainer-->
                    
          <div class="headlineContainer">
            <div class="headline">
                <p>Want a lower<br>monthly payment?</p>
            </div><!--.headline-->
          </div><!-- .headlineContainer -->
        </div>
        
        <div>
          <div class="pageTitleContainer">
              <div class="pageTitle">
                  <p>Today&#8217;s Home Equity Rates</p>
              </div><!--.pageTitle-->
            </div><!--.pageTitleContainer-->
                     
            <div class="headlineContainer">
            <div class="headline">
                <p>Need flexible<br>access to funds?</p>
            </div><!--.headline-->
          </div><!-- .headlineContainer -->
        </div>
        
        <div>
            <div class="pageTitleContainer">
              <div class="pageTitle">
                  <p>Mortgage Specialist</p>
              </div><!--.pageTitle-->
            </div><!--.pageTitleContainer-->
                     
            <div class="headlineContainer">
            <div class="headline">
                <p>Get your<br><span class="italic">personalized</span> rate<br>quote today</p>
            </div><!--.headline-->
          </div><!-- .headlineContainer -->
        </div>        
    </div><!--#slideshow-->
    

    
        
    <div id="carousel">
        <ul>
            <li class="card1">
                <div class="input1">
                    <p id="30YR_MortRate">2.344</p>
                </div><!--#input-->
                <div class="input2">
                    <p id="30YR_MortApr">2.234</p>
                </div><!--#input-->
                <div class="input3">
                    <p id="30YR_MortPoints">3.23</p>
                </div><!--#input-->
                <div class="input4">
                    <p id="30YR_MortMonthlyPaymentPer1000">4.23</p>
                </div><!--#input-->
                <div class="input5">
                    <p id="30YR_Date">mm/dd/yy</p>
                </div><!--#input-->
                <img src="Asset/card_fixedRateMort_30yr.png">
                <img src="Asset/card_reflection.png">
                <div class="whiteBox"></div>
            </li><!--card-->
        
        
        
            <li class="card2">
                <div class="input1">
                    <p id="15YR_MortRate">2.344</p>
                </div><!--#input-->
                <div class="input2">
                    <p id="15YR_MortApr">2.234</p>
                </div><!--#input-->
                <div class="input3">
                    <p id="15YR_MortPoints">3.23</p>
                </div><!--#input-->
                <div class="input4">
                    <p id="15YR_MortMonthlyPaymentPer1000">4.23</p>
                </div><!--#input-->
                <div class="input5">
                    <p id="15YR_Date">mm/dd/yy</p>
                </div><!--#input-->
                <img src="Asset/card_fixedRateMort_15yr.png">
                <img src="Asset/card_reflection.png">
                <div class="whiteBox"></div>
            </li><!--card-->
        
            <li class="card3">
                <div class="input1">
                    <p id="HE_HeRate">2.44</p>
                </div><!--#input-->
                <div class="input2">
                    <p id="HE_HeRateMinLoanAmount">123.456</p>
                </div><!--#input-->
                <div class="input3">
                    <p id="HE_MonthlyPaymentPer1000">3.23</p>
                </div><!--#input-->
                <div class="input4">
                    <p id="HE_Date">mm/dd/yy</p>
                </div><!--#input-->
                <img src="Asset/card_lineOfCredit.png" />
                <img src="Asset/card_reflection.png">
                <div class="whiteBox"></div>
            </li><!--card-->
        
            <li class="card4">
                <img src="Asset/card_askHow.png"> 
                <img src="Asset/card_reflection.png">           
                <div class="whiteBox"></div>
            </li><!--card-->
        
         </ul>
 
    </div><!--#carousel-->

    <div class='legal'>
      <p><span class="legalBold">Fixed 30-Year Purchase:</span> Rate and APR are based on $200,000 loan, 20% down payment and a borrower with excellent credit. For details, please see a Bank of America associate or log onto www.bankofamerica.com. Actual rate and APR will vary, based on factors such as points, loan amount, loan-to-value, borrower’s credit, property type, and occupancy. Other mortgage products are also available to meet your needs.</p>
      <p><span class="legalBold">Fixed 15-Year Refinance:</span> Rate and APR are based on $200,000, loan, 80% loan-to-value, and a borrower with excellent credit. For details, please see a Bank of America associate or log onto www.bankofamerica.com. Actual rate and APR will vary, based on factors such as points, loan amount, loan-to-value, borrower’s credit, property type, and occupancy. Other mortgage products are also available to meet your needs.</p>
      <p><span class="legalBold">HELOC:</span> The sample variable Annual Percentage Rate (APR) is for illustrative purposes only and assumes a new home equity line of credit in second lien position, with a combined loan-to-value (CLTV) ratio of up to 70% on a 1- to 4-unit owner occupied primary residence, and a borrower with excellent credit. Minimum line amount is $25,000. The term of the loan is 25 years: 10-year draw period, 15-year repayment period. APR is based on The Wall Street Journal Prime Rate (<span id="HE_IndexValue">X.XX</span>% on <span id="todayMonth">XX</span>/<span id="todayDate">XX</span>/<span id="todayYear">XX</span>) plus a margin and will vary with the Prime Rate, but will not exceed 24%. Sample APR includes a 0.25% discount for maintaining automatic payment from a Bank of America account, and a 0.25% discount for drawing and maintaining an initial minimum balance of $25,000 for at least the first 3 full billing cycles. Margin, rate and payment amounts may vary based on property value, line amount and other factors. Your actual rate and payment amount may be higher or lower than advertised rate and payment amounts.  Property insurance is always required and flood insurance is required where necessary. To obtain a home equity line of credit from Bank of America, a security interest will be taken on borrower’s 1- to 4-unit owner-occupied primary residence as collateral. Mobile homes, manufactured homes, cooperatives, lots or homes undergoing construction and commercial properties, investment and rental properties are not eligible collateral. Primary borrower must be a title holder on collateral. Bank of America pays all closing costs (except in South Carolina where borrower pays attorney fees in excess of $300). The combined amount of all third-party fees, including any taxes owed to state and/or local government units, generally totals between $836.10 and $7,324.60 ($1,374.60 and $11,790.60 in New York). If you terminate your account within 36 months of opening it, you will be required to pay an early closure fee of $450 plus any mortgage and government taxes and any closing agent or attorney fees Bank of America paid on your behalf.</p>
      <p>Bank of America, N.A., Member FDIC<img src="Asset/EqHousing.png">Equal Housing Lender &copy; 2013 Bank of America Corporation. Credit and collateral are subject to approval.Terms and conditions apply. This is not a commitment to lend. Programs, rates, terms and conditions are subject to change without notice.</p>
    </div><!--.legal-->

</div><!--.mainContainer-->


</body>
</html>
